import {NgModule} from '@angular/core';
import {RouterModule,Routes} from '@angular/router';

import {ClassicMovieComponent} from './classic-movie.component';
import {ComicMovieComponent} from './comic-movie.component';
import {ScienceMovieComponent} from './science-movie.component';

const routes: Routes = [
    {path: '',redirectTo: '/science',pathMatch:'full'},
    {path:'science', component: ScienceMovieComponent},
    {path: 'comic',component: ComicMovieComponent},
    {path: 'classic',component: ClassicMovieComponent}
];

@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
})

export class AppRoutingModule{}